from django.urls import path, include
from rest_framework import routers

from . import api
from . import views

router = routers.DefaultRouter()
router.register(r'device', api.DeviceViewSet)


urlpatterns = (
    # urls for Django Rest Framework API
    path('api/v1/', include(router.urls)),
)

urlpatterns += (
    # urls for Device
    path('devices/device/', views.DeviceListView.as_view(), name='devices_device_list'),
    path('devices/device/create/', views.DeviceCreateView.as_view(), name='devices_device_create'),
    path('devices/device/detail/<int:pk>/', views.DeviceDetailView.as_view(), name='devices_device_detail'),
    path('devices/device/update/<int:pk>/', views.DeviceUpdateView.as_view(), name='devices_device_update'),
)

